//跨域代理前缀
const API_PROXY_PREFIX = '/api'
//const Host = process.env.NODE_ENV === 'production' ? process.env.VUE_APP_API_BASE_URL : API_PROXY_PREFIX
const Host = API_PROXY_PREFIX
import {METHOD, request} from './request'

const Path = '/merchant/print-designer'

//列表
export async function index(params) {
  return request(`${Host}${Path}/index`, METHOD.GET, params)
}

//详情
export async function view(params = {}) {
  return request(`${Host}${Path}/view`, METHOD.GET, params)
}

//打印组件
export async function widget(params) {
  return request(`${Host}${Path}/widget`, METHOD.GET, params)
}

//类型
export async function merchant(params = {}) {
  return request(`${Host}${Path}/merchant`, METHOD.GET, params)
}

//类型
export async function type(params = {}) {
  return request(`${Host}${Path}/type`, METHOD.GET, params)
}

//编辑
export async function edit(params) {

  return request(`${Host}${Path}/edit`, METHOD.POST, params)

}

//删除
export async function del(params) {
  return request(`${Host}${Path}/delete`, METHOD.GET, params)
}
